import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import less from 'less'
import 'animate.css'
import VueRouter from 'vue-router'
import 'font-awesome/css/font-awesome.min.css'

// 路由页面
import Index from './components/pages/Index.vue'
import Booking from './components/pages/Booking.vue'
import Foods from './components/pages/Foods.vue'
import JoinUs from './components/pages/JoinUs.vue'
import About from './components/pages/About.vue'
import Maerdaifu from './components/pages/Maerdaifu.vue'
import NotFound from './components/pages/NotFound.vue'

Vue.use(ElementUI)
Vue.use(less)
Vue.use(VueRouter)

Vue.config.productionTip = false

const router = new VueRouter({
  // mode: 'history',
  routes: [
    { path: '/index', component: Index },
    { path: '/book', component: Booking },
    { path: '/foods', component: Foods },
    { path: '/joinus', component: JoinUs },
    { path: '/about', component: About },
    { path: '/maerdaifu', component: Maerdaifu },
    { path: '*', component: NotFound },   // 配置 404 页面
    { path: '/', redirect: '/index' },
  ]
})

new Vue({
  render: h => h(App),
  router,
}).$mount('#app')
